<?PHP
  $page = new Page();
  $page->loadProperties($GLOBALS['db']->EscapeString($_GET['site']));
?>
<h1>Seite l&ouml;schen</h1>
<?PHP
  if(!$_GET['delete']){
     $template = new Template();
	 $template->load("site_delete");
	 $template->assign_var("TITLE", $page->title);
	 $template->assign_var("SITESURL", "/admin/?page=sites");
	 $template->assign_var("DELETEURL", "/admin/?page=site-delete&site=".urlencode($_GET['site'])."&delete=true");
	 $template->output();
  }
  else{
    if($page->delete()){
     $template = new Template();
	 $template->load("message");
	 $template->assign_var("MESSAGE","Die Seite <strong>". $page->title."</strong> wurde gel&ouml;scht!");
	 $template->output();
    }
  }
?>